Prev Next |
The Sitecore Application Programming Interface (API) is very extensive. It has to be. We use it ourselves to define the Sitecore browser-based interfaces and the rest of the Sitecore system. In fact, the API consists of more than 90 namespaces, each of which contains a number of classes, which in turn contain a number of methods and attributes.
Luckily, the average Sitecore web site developer does not need to know the entire API to produce world-class web sites. Knowledge of a handful of classes is enough to get started. Once a developer understands these classes, it’s easy to locate and understand any additional required classes and methods using Visual Studio’s Intellisense and Sitecore’s API Reference materials.
This article introduces developers to the most common Sitecore V5 classes. In particular:
Sitecore.Context |
Holds information about the current state. |
Sitecore.Configuration.Factory |
Provides access to information defined in the installation’s web.config file. |
Sitecore.Data.Database |
Provides access to the Items, Aliases, Templates, and other information available in a Sitecore Database. |
Sitecore.Data.Items.Item |
A language specific single version of an Item, usually retrieved directly from a Database. |
Sitecore.Data.Fields.* |
A collection of classes that represent the various Sitecore data types and provide convenience functions for translating information out of its XML storage format. |
Sitecore.SecurityModel.Domain |
Represents a Sitecore Domain, which contains Users, Roles, and related information. |
Sitecore.SecurityModel.UserItem |
Represents a Sitecore User. Provides access to User properties. |
Sitecore.Globalization.Language |
Represents both web site and client languages. |
Sitecore.Sites.SiteContext |
Represents a Sitecore site. Provides access to Site properties. |
Regardless of what the developer needs to do, understanding how to complete the task starts with understanding the context in which custom code executes.
In some cases, developers need access to a different Database, Security Domain, or even a different Sitecore Site. In these cases, the Sitecore.Configuration.Factory class comes in handy.
Sitecore provides many classes which encapsulate both the content and infrastructure associated with a Site.
The Sitecore Security Model defines which Users have access rights to content and infrastructure Items managed by Sitecore
Sitecore defines many classes to keep track of and access configuration settings. This section describes the most commonly used
Prev Next